fix: compatible with derive_more 2.1.0#272
Merged
Merged
Conversation
The derive_more 2.1.0 release includes a fix for 'Missing trait bounds in AsRef/AsMut derives when associative types are involved' (#474). This fix adds additional where clauses to the generated impl blocks that require GenericArray to implement AsRef for itself, which it doesn't. Replace the derived AsRef with a manual implementation to avoid the trait bound issue while maintaining the same functionality.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #272 +/- ##
==========================================
- Coverage 96.20% 96.13% -0.08%
==========================================
Files 80 80
Lines 3136 3076 -60
==========================================
- Hits 3017 2957 -60
Misses 119 119 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Owner
|
Weird, I thought I responded and merged this a couple of days ago. Oh well, apologies for the late response. PR looks good, thanks! Bit bummed though that they forced trait bounds on generic parameters which aren't used. That's not a minor version bump under "fixes" 😅 |
Contributor
Author
|
yeah definitely, at least the fix wasn't too bad in this case |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
derive_more2.1.0 release includes a fix for "Missing trait bounds inAsRef/AsMutderives when associative types are involved" (#474).This fix adds additional where clauses to the generated impl blocks that require
GenericArrayto implementAsReffor itself, which it doesn't. This causes a compilation error inrops:This PR replaces the derived
AsRefwith a manual implementation to avoid the trait bound issue while maintaining the same functionality.Changes
AsReffrom the derive macro onAuthorizationTagimpl AsRef<Tag<C::AuthorizationTagSize>> for AuthorizationTag<C>Test Plan
This was discovered when mise's lockfile maintenance PR updated
derive_morefrom 2.0.1 to 2.1.0: jdx/mise#7211🤖 Generated with Claude Code